% Test the functions makeppftfilter and applyppftfilter against the
% preconditioned PPFT.
%
% Yoel Shkolnisky, December 2010.

for n=2:2:128;
    A=rand(n,n);
    tic;
    [pp1 pp2]=optimizedPPFT2D(A);
    B=preconditionedAdjointPPFT2D(pp1,pp2);
    t1=toc;
    
    H=makePPFTFilter2D(n,1);
    tic;
    C=applyPPFTFilter2D(A,H);
    t2=toc;

    err=norm(B(:)-C(:))./norm(B(:));    
    reportTestResult(n,err,t1/t2);
end
